package br.com.SGF.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


@SuppressWarnings("serial")
@Entity
@Table(name="cadastro_cargo")
@NamedQueries({
	@NamedQuery(name = "Cargo.listar", query = "SELECT cargo FROM CargoDomain cargo"),
	@NamedQuery(name = "Cargo.obterCodigo", query = "SELECT cargo  FROM CargoDomain cargo where codCargo = :codigo") })
public class CargoDomain implements Serializable{
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="car_id")
	private int codCargo;
	
	@Column(name="car_nome")
	private String nome; 
	
	@Column(name="car_descricao")
	private String descricao;
	
	@Column(name="car_inativo", columnDefinition="tinyint default false")
	private boolean inativo;

	public int getCodCargo() {
		return codCargo;
	}

	public void setCodCargo(int codCargo) {
		this.codCargo = codCargo;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public boolean isInativo() {
		return inativo;
	}

	public void setInativo(boolean inativo) {
		this.inativo = inativo;
	}

	@Override
	public String toString() {
		return "CargoDomain [codCargo=" + codCargo + ", nome=" + nome
				+ ", descricao=" + descricao +  "]";
	}
	
	
	

}
